package com.simpleaccount.Entity;


import android.os.Parcel;

import java.io.Serializable;
import java.util.Date;

import cn.bmob.v3.BmobObject;

/**
 * Created by Administrator on 2017/7/11.
 */


public class Entry extends BmobObject implements Serializable{
//    public String objectId;
    private int id;
    private double money;
    private String category=null;
    private Date date;
    private String msg;
    private int color;
    private int type;

    public Entry(){
        type=-1;
    }
    public Entry(int type,Date date,double money){
        this.date=date;
        this.type=type;
        this.money=money;
    }
    public Entry(int id, double money, Category category, Date date, String msg) {
        this.id = id;
        this.money = money;
        this.category = category.getName();
        this.date = date;
        this.msg = msg;
        this.type=category.getType();
        this.color=category.getColor();

    }
    public Entry(int id,double money,String category,Date date,String msg){
        //this.objectId=objectId;
        this.id=id;
        this.money=money;
        this.category=category;
        this.date=date;
        this.msg=msg;
    }
    public Entry(int id, double money, String category, Date date, String msg,int color,int type) {
        this.id = id;
        this.money = money;
        this.category = category;
        this.date = date;
        this.msg = msg;
        this.color=color;
        this.type=type;
    }

    protected Entry(Parcel in) {
        id = in.readInt();
        money = in.readDouble();
        category = in.readString();
        msg = in.readString();
        color = in.readInt();
    }

    public int getColor() {
        return color;
    }

    public int getType() {
        return type;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


}
